package com.youkeda.dewu.dataobject;

import java.io.Serializable;
import java.util.Date;

import com.youkeda.dewu.model.Order;
import lombok.Data;
import org.springframework.beans.BeanUtils;

/**
 * order
 * @author 
 */
@Data
public class OrderDO implements Serializable {
    private String id;

    private String ordernumber;

    private Long userId;

    private String productDetailId;

    private Double totalPrice;

    private String orderStatus;

    private Date gmtCreated;

    private Date gmtModified;

    private static final long serialVersionUID = 1L;
    public OrderDO(){

    }

    public OrderDO(Order order){
        BeanUtils.copyProperties(order,this);
    }

    public Order toModel(){
        Order order = new Order();
        BeanUtils.copyProperties(this,order);
        return order;
    }
}